package cc.chinagps.gboss.common;

import org.apache.logging.log4j.core.config.ConfigurationSource;
import org.apache.logging.log4j.core.config.Configurator;

import java.io.File;
import java.io.FileInputStream;

public class Log4j2ConfigLoader {
    public static void init() {
        ConfigurationSource source;
        try {
            String path = "conf/log4j2.xml";
            source = new ConfigurationSource(new FileInputStream(new File(path)));
            Configurator.initialize(null, source);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
